package examinefour;
import junit.framework.TestCase;
import org.junit.Test;
public class ComplexTestzlx extends TestCase {
    Complex a = new Complex();
    Complex b = new Complex(2,-3);
    Complex c = new Complex(1.4,3.3);
    Complex d = new Complex(1.44,3.33);
    String s = new String("0.00");
    Complex complex = new Complex(5.889,0);
    @Test
    public void testequals(){
        assertFalse(a.equals(s));
    }
    @Test
    public void testToString(){
        assertEquals("5.89",complex.toString());
    }
    public void testdoubleFormat(){
        assertEquals("8.00",a.doubleFormat(8));
        assertEquals("-2.00",a.doubleFormat(-2));
        assertEquals("-2.00",a.doubleFormat(-2.000));
    }
    @Test
    public void testComplexMul(){
        assertEquals("-8.97+9.41i",d.complexMulti(c).toString());
    }
}